package com.cqust.icc;

import com.cqust.icc.Biz.CardBiz;
import com.cqust.icc.Entity.Card;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author 张成
 * @version 1.0
 * @date 2022/3/17 14:48
 */
public class Task1Test {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("classpath:applicationContext.xml");
        CardBiz cardBiz = (CardBiz) context.getBean("cardBiz");
        Card card = (Card) context.getBean("card");
        cardBiz.charge(card);
        card.setCardMoney("1111");
        cardBiz.charge(card);
    }
}
